Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
ADD(active(X1), X2) → ADD(X1, X2)
FROM(active(X)) → FROM(X)
CONS(X1, mark(X2)) → CONS(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)
MARK(true) → ACTIVE(true)
ACTIVE(first(s(X), cons(Y, Z))) → FIRST(X, Z)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → ADD(mark(X1), X2)
FIRST(active(X1), X2) → FIRST(X1, X2)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(first(X1, X2)) → FIRST(mark(X1), mark(X2))
S(active(X)) → S(X)
MARK(false) → ACTIVE(false)
MARK(s(X)) → ACTIVE(s(X))
MARK(first(X1, X2)) → MARK(X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
AND(X1, active(X2)) → AND(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
FIRST(X1, mark(X2)) → FIRST(X1, X2)
ACTIVE(from(X)) → FROM(s(X))
ACTIVE(and(true, X)) → MARK(X)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(and(false, Y)) → MARK(false)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ADD(X1, mark(X2)) → ADD(X1, X2)
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X1)
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
S(mark(X)) → S(X)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → IF(mark(X1), X2, X3)
MARK(and(X1, X2)) → AND(mark(X1), X2)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
ACTIVE(first(0, X)) → MARK(nil)
FIRST(X1, active(X2)) → FIRST(X1, X2)
ACTIVE(from(X)) → S(X)
AND(mark(X1), X2) → AND(X1, X2)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
MARK(0) → ACTIVE(0)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
ACTIVE(first(s(X), cons(Y, Z))) → CONS(Y, first(X, Z))
ACTIVE(add(0, X)) → MARK(X)
MARK(nil) → ACTIVE(nil)
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
ADD(active(X1), X2) → ADD(X1, X2)
FROM(active(X)) → FROM(X)
CONS(X1, mark(X2)) → CONS(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)
MARK(true) → ACTIVE(true)
ACTIVE(first(s(X), cons(Y, Z))) → FIRST(X, Z)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(add(X1, X2)) → ADD(mark(X1), X2)
FIRST(active(X1), X2) → FIRST(X1, X2)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(first(X1, X2)) → FIRST(mark(X1), mark(X2))
S(active(X)) → S(X)
MARK(false) → ACTIVE(false)
MARK(s(X)) → ACTIVE(s(X))
MARK(first(X1, X2)) → MARK(X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
AND(X1, active(X2)) → AND(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
FIRST(X1, mark(X2)) → FIRST(X1, X2)
ACTIVE(from(X)) → FROM(s(X))
ACTIVE(and(true, X)) → MARK(X)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(and(false, Y)) → MARK(false)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ADD(X1, mark(X2)) → ADD(X1, X2)
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X1)
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
S(mark(X)) → S(X)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → IF(mark(X1), X2, X3)
MARK(and(X1, X2)) → AND(mark(X1), X2)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
ACTIVE(first(0, X)) → MARK(nil)
FIRST(X1, active(X2)) → FIRST(X1, X2)
ACTIVE(from(X)) → S(X)
AND(mark(X1), X2) → AND(X1, X2)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
MARK(0) → ACTIVE(0)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
ACTIVE(first(s(X), cons(Y, Z))) → CONS(Y, first(X, Z))
ACTIVE(add(0, X)) → MARK(X)
MARK(nil) → ACTIVE(nil)
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 8 SCCs with 17 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FIRST(active(X1), X2) → FIRST(X1, X2)
FIRST(X1, active(X2)) → FIRST(X1, X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)
FIRST(X1, mark(X2)) → FIRST(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FIRST(active(X1), X2) → FIRST(X1, X2)
FIRST(X1, active(X2)) → FIRST(X1, X2)
FIRST(X1, mark(X2)) → FIRST(X1, X2)
FIRST(mark(X1), X2) → FIRST(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ADD(active(X1), X2) → ADD(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ADD(active(X1), X2) → ADD(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF(X1, mark(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF(X1, mark(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
AND(X1, active(X2)) → AND(X1, X2)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(active(X1), X2) → AND(X1, X2)
AND(X1, mark(X2)) → AND(X1, X2)
AND(X1, active(X2)) → AND(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(and(true, X)) → MARK(X)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(and(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(and(true, X)) → MARK(X)
MARK(and(X1, X2)) → MARK(X1)
ACTIVE(if(true, X, Y)) → MARK(X)
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = x1 + x2   
POL(and(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = x1   
POL(false) = 0   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(if(x1, x2, x3)) = x1 + x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 1   

The following usable rules [17] were oriented:

and(X1, mark(X2)) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
mark(nil) → active(nil)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
first(active(X1), X2) → first(X1, X2)
first(mark(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
active(first(0, X)) → mark(nil)
s(active(X)) → s(X)
s(mark(X)) → s(X)
active(and(false, Y)) → mark(false)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
mark(false) → active(false)
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
mark(true) → active(true)
active(add(0, X)) → mark(X)
mark(cons(X1, X2)) → active(cons(X1, X2))
active(and(true, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), X2))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
mark(from(X)) → active(from(X))
active(if(true, X, Y)) → mark(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(if(false, X, Y)) → MARK(Y)
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = x1 + x2   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1   
POL(false) = 1   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(if(x1, x2, x3)) = x1 + x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

and(X1, mark(X2)) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
mark(nil) → active(nil)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
first(active(X1), X2) → first(X1, X2)
first(mark(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
active(first(0, X)) → mark(nil)
s(active(X)) → s(X)
s(mark(X)) → s(X)
active(and(false, Y)) → mark(false)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
mark(false) → active(false)
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
mark(true) → active(true)
active(add(0, X)) → mark(X)
mark(cons(X1, X2)) → active(cons(X1, X2))
active(and(true, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), X2))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
mark(from(X)) → active(from(X))
active(if(true, X, Y)) → mark(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = x1 + x2   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = 0   
POL(false) = 0   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1   
POL(if(x1, x2, x3)) = x1 + x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

and(X1, mark(X2)) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
mark(nil) → active(nil)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
first(active(X1), X2) → first(X1, X2)
first(mark(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
active(first(0, X)) → mark(nil)
s(active(X)) → s(X)
s(mark(X)) → s(X)
active(and(false, Y)) → mark(false)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
mark(false) → active(false)
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
mark(true) → active(true)
active(add(0, X)) → mark(X)
mark(cons(X1, X2)) → active(cons(X1, X2))
active(and(true, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), X2))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
mark(from(X)) → active(from(X))
active(if(true, X, Y)) → mark(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
MARK(if(X1, X2, X3)) → MARK(X1)
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = x1 + x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = 0   
POL(false) = 0   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 0   
POL(if(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 1   

The following usable rules [17] were oriented:

and(X1, mark(X2)) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
mark(nil) → active(nil)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
first(active(X1), X2) → first(X1, X2)
first(mark(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
active(first(0, X)) → mark(nil)
s(active(X)) → s(X)
s(mark(X)) → s(X)
active(and(false, Y)) → mark(false)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
mark(false) → active(false)
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
mark(true) → active(true)
active(add(0, X)) → mark(X)
mark(cons(X1, X2)) → active(cons(X1, X2))
active(and(true, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), X2))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
mark(from(X)) → active(from(X))
active(if(true, X, Y)) → mark(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(s(X)) → ACTIVE(s(X))
MARK(first(X1, X2)) → MARK(X2)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
ACTIVE(add(0, X)) → MARK(X)
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(add(0, X)) → MARK(X)
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(from(X)) → ACTIVE(from(X))
MARK(s(X)) → ACTIVE(s(X))
MARK(first(X1, X2)) → MARK(X2)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
Used ordering: Polynomial interpretation [25]:

POL(0) = 1   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = x1 + x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1   
POL(false) = 0   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(if(x1, x2, x3)) = x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

and(X1, mark(X2)) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
and(mark(X1), X2) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
mark(nil) → active(nil)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
first(active(X1), X2) → first(X1, X2)
first(mark(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
active(first(0, X)) → mark(nil)
s(active(X)) → s(X)
s(mark(X)) → s(X)
active(and(false, Y)) → mark(false)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
mark(false) → active(false)
mark(0) → active(0)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
mark(true) → active(true)
active(add(0, X)) → mark(X)
mark(cons(X1, X2)) → active(cons(X1, X2))
active(and(true, X)) → mark(X)
active(if(false, X, Y)) → mark(Y)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), X2))
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
mark(from(X)) → active(from(X))
active(if(true, X, Y)) → mark(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
MARK(from(X)) → ACTIVE(from(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(from(X)) → ACTIVE(from(X))
MARK(cons(X1, X2)) → ACTIVE(cons(X1, X2))
MARK(and(X1, X2)) → ACTIVE(and(mark(X1), X2))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 1   
POL(MARK(x1)) = 1 + x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = 1 + x1 + x2   
POL(and(x1, x2)) = 1 + x2   
POL(cons(x1, x2)) = 1   
POL(false) = 0   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1   
POL(if(x1, x2, x3)) = x1 + x2 + x3   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

s(active(X)) → s(X)
s(mark(X)) → s(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
QDP
                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(s(X)) → ACTIVE(s(X))
MARK(first(X1, X2)) → MARK(X2)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
The remaining pairs can at least be oriented weakly.

MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(s(X)) → ACTIVE(s(X))
MARK(first(X1, X2)) → MARK(X2)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 0   
POL(MARK(x1)) = x1   
POL(active(x1)) = 0   
POL(add(x1, x2)) = 0   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(false) = 0   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 0   
POL(if(x1, x2, x3)) = 1 + x2   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

s(active(X)) → s(X)
s(mark(X)) → s(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(first(X1, X2)) → MARK(X2)
MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(first(X1, X2)) → MARK(X2)
The remaining pairs can at least be oriented weakly.

MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 0   
POL(MARK(x1)) = x1   
POL(active(x1)) = 0   
POL(add(x1, x2)) = 0   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(false) = 0   
POL(first(x1, x2)) = 1 + x1 + x2   
POL(from(x1)) = 0   
POL(if(x1, x2, x3)) = 0   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

s(active(X)) → s(X)
s(mark(X)) → s(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP
                                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))

The TRS R consists of the following rules:

active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ UsableRulesProof
QDP
                                                ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))

The TRS R consists of the following rules:

add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(active(X)) → s(X)
s(mark(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

s(mark(X)) → s(X)
s(active(X)) → s(X)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
Used ordering: POLO with Polynomial interpretation [25]:

POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = 2·x1   
POL(add(x1, x2)) = x1 + x2   
POL(mark(x1)) = 2·x1   
POL(s(x1)) = x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ QDPOrderProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ UsableRulesProof
                                              ↳ QDP
                                                ↳ UsableRulesReductionPairsProof
QDP
                                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → ACTIVE(s(X))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.